/**Being.java
 * 
 * This is the basis for the different creatures in the game
 * including the player.
 * 
 * @author Christopher Carithers
 *Last Update: 4/28/2014
 *
 */

public class Being 
{
   private String m_PlayerName;
   private int m_XPosition;
   private int m_YPosition;
   private int m_AttackLevel;
   private int m_StrengthLevel;
   private int m_DefenceLevel;
   private int m_HitPointsLevel;
   private int m_CombatLevel;
   
   public Being()
   {
	  m_PlayerName = "";
	  m_XPosition = 1;
	  m_YPosition = 1;
	  m_AttackLevel = 1;
	  m_StrengthLevel = 1;
	  m_DefenceLevel = 1;
	  m_HitPointsLevel = 10;
	  m_CombatLevel = calculateCombatLevel(m_AttackLevel, m_StrengthLevel, m_DefenceLevel);
   }
   
   public Being(String playerName)
   {
      m_PlayerName = playerName;
      m_XPosition = 1;
      m_YPosition = 1;
      m_AttackLevel = 1;
      m_StrengthLevel = 1;
      m_DefenceLevel = 1;
      m_HitPointsLevel = 10;
      m_CombatLevel = calculateCombatLevel(m_AttackLevel, m_StrengthLevel, m_DefenceLevel);
   }
   
   public Being(String playerName, int xPosition, int yPosition)
   {
	  m_PlayerName = playerName;
	  m_XPosition = xPosition;
	  m_YPosition = yPosition;
	  m_AttackLevel = 1;
	  m_StrengthLevel = 1;
	  m_DefenceLevel = 1;
	  m_HitPointsLevel = 10;
	  m_CombatLevel = calculateCombatLevel(m_AttackLevel, m_StrengthLevel, m_DefenceLevel);
   }
   
   public Being(String playerName, int xPosition, int yPosition, int attackLevel, int strengthLevel, int defenceLevel, int hitPointsLevel)
   {
	  m_PlayerName = playerName;
	  m_XPosition = xPosition;
	  m_YPosition = yPosition;
	  m_AttackLevel = attackLevel;
	  m_StrengthLevel = strengthLevel;
	  m_DefenceLevel = defenceLevel;
	  m_HitPointsLevel = hitPointsLevel;
	  m_CombatLevel = calculateCombatLevel(m_AttackLevel, m_StrengthLevel, m_DefenceLevel);
   }
   
   private int calculateCombatLevel(int attackLevel, int strengthLevel, int defenceLevel)
   {
      int combatLevel;
      combatLevel = attackLevel + strengthLevel + defenceLevel;
      return combatLevel;
   }
   
   public void printBeingName()
   {
	  System.out.println("Being Name: " + this.getBeingName());
   }
   
   public void printBeingStats()
   {
	  System.out.println("Combat Level: " + m_CombatLevel);
	  System.out.println("Attack Level: " + m_AttackLevel);
	  System.out.println("Strength Level: " + m_StrengthLevel);
	  System.out.println("Defence Level: " + m_DefenceLevel);
	  System.out.println("HitPoints Level: " + m_HitPointsLevel);
   }
   
   public String getBeingName()
   {
	  return m_PlayerName;
   }
   
   public void setBeingName(String playerName)
   {
	  m_PlayerName = playerName;
   }
   
   public int getXPosition()
   {
	  return m_XPosition;
   }
   
   public void setXPosition(int xPosition)
   {
	  m_XPosition = xPosition;
   }
   
   public int getYPosition()
   {
	  return m_YPosition;
   }
   
   public void setYPosition(int yPosition)
   {
	  m_YPosition = yPosition;
   }
   
   public int getAttackLevel()
   {
	  return m_AttackLevel;
   }
   
   public void setAttackLevel(int attackLevel)
   {
	  m_AttackLevel = attackLevel;
   }
   
   public int getStrengthLevel()
   {
	  return m_StrengthLevel;
   }
   
   public void setStrengthLevel(int strengthLevel)
   {
	  m_StrengthLevel = strengthLevel;
   }
   
   public int getDefenceLevel()
   {
	  return m_DefenceLevel;
   }
   
   public void setDefenceLevel(int defenceLevel)
   {
	  m_DefenceLevel = defenceLevel;
   }
   
   public int getHitPointsLevel()
   {
	  return m_HitPointsLevel;
   }
   
   public void setHitPointsLevel(int hitPointsLevel)
   {
	  m_HitPointsLevel = hitPointsLevel;
   }
   
   public int getCombatLevel()
   {
	  return m_CombatLevel;
   }
   
   public void setCombatLevel(int combatLevel)
   {
	  m_CombatLevel = combatLevel;
   }
}
